//
//  HomeVIewCell.swift
//  ImageBrowse
//
//  Created by zs on 16/6/19.
//  Copyright © 2016年 zs. All rights reserved.
//

import UIKit
import SDWebImage

class HomeVIewCell: UICollectionViewCell {
    
    // MARK:- 控件的属性

    @IBOutlet weak var imageView: UIImageView!
    
    // MARK:- 定义的属性
    
    var shop : Shop? {
    
        didSet {
        
           //获取图片的URL
            guard let urlString = shop?.q_pic_url else {
              return
            }
            
            //创建NSURL
            guard let url = NSURL(string: urlString) else {
               return
            }
            // 3.设置图片
            imageView.sd_setImageWithURL(url, placeholderImage: UIImage(named: "empty_picture"))
        }

    
    }
    
}
